package com.third.bank.util;

/**
 * 错误码
 */
public enum ErrorMessage {

    SUCCESS(0, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"),
    NOT_LOGIN_ERROR(40100, "未登录"),
    NO_AUTH_ERROR(40101, "无权限"),
    NOT_FOUND_ERROR(40400, "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),
    CURRENT_USER_IS_NOT_EXIST(50002,"当前用户不存在"),
    PLEASE_INPUT_PASSWORD_OR_ACCOUNT(50003,"请输入存款账号和密码"),
    ADD_MONEY_ACCOUNT_OR_PASSWORD_IS_FAIL(50004,"存款账号或密码不正确"),
    PLEASE_INPUT_WDPASSWORD_OR_ACCOUNT(50007,"请输入取款账号和密码"),
    ADD_MONEY_ACCOUNT_OR_WDPASSWORD_IS_FAIL(50008,"取款账号或密码不正确"),
    CURRENT_USER_HAS_NOT_ACCOUNT(50005,"当前用户还没有账户"),
    INSUFFICIENT_BALANCE(50006,"余额不足");

    //    状态码
    private int code;
//    信息
    private String msg;

    ErrorMessage(int code, String message) {
        this.code = code;
        this.msg = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return msg;
    }
}
